# NOT RUN {
##Samples should be arranged columnwise.
##Input data should not contain any categorial
##data such as taxonomic assignment or barcode sequences.
##An example of the input data can be found below:
example_input_data <- matrix(c(sample(1:20, 100, replace = TRUE),
sample(1:30, 100, replace = TRUE),sample(1:40, 100, replace = TRUE)), nrow = 100)
colnames(example_input_data) <- c("sample_1","sample_2","sample_3")
example_input_data <- as.data.frame(example_input_data)
example_input_data
##Selection of the desired number of counts
##(e.g., total OTU counts of the sample with the lowest sequencing depth):
Cmin <- min(colSums(example_input_data))
Cmin
##Running the SRS function
SRS_output <- SRS(example_input_data, Cmin)
SRS_output
##Samples that have a total number of counts < Cmin will be discarded:
SRS_output <- SRS(example_input_data, Cmin+1)
SRS_output
# }
Run the code above in your browser using DataLab